package com.boot.mapper;

import com.boot.entity.Address;
import com.boot.entity.Menu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

//@Mapper:让SpringBoot自动扫描识别到它
@Mapper
public interface MenuMapper {

    @Select("select m.id,m.name,m.url from t_menu m left join t_user_menu um on um.menu_id = m.id where um.user_id = #{userId}")
    List<Menu> getByUserId(Long userId);

}
